[Core] Fix Pylint Errors - Import related issues - #48392
Conversation
8195f21 to
6e347cc
Compare
There was a problem hiding this comment.
Pull request overview
Cleans up Pylint import and line-length violations across Azure Core tests, test infrastructure, performance tests, and samples without changing runtime behavior.
Changes:
- Reorders imports and removes unused or duplicate imports.
- Replaces wildcard imports with explicit symbols.
- Wraps long lines and adds targeted Pylint suppressions.
Reviewed changes
Copilot reviewed 78 out of 78 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/utils.py |
Organizes shared test utility imports. |
tests/tracing_common.py |
Reorders tracing imports. |
tests/testserver_tests/coretestserver/coretestserver/test_routes/helpers.py |
Organizes standard, Flask, and local imports. |
tests/testserver_tests/coretestserver/coretestserver/test_routes/headers.py |
Removes an unused Flask import. |
tests/testserver_tests/coretestserver/coretestserver/test_routes/errors.py |
Adds targeted Pylint suppressions. |
tests/testserver_tests/coretestserver/coretestserver/__init__.py |
Reorders standard and Flask imports. |
tests/test_utils.py |
Adds targeted Pylint suppressions. |
tests/test_user_agent_policy.py |
Organizes test and SDK imports. |
tests/test_universal_pipeline.py |
Removes an unused import and reorders utilities. |
tests/test_tracing_policy.py |
Groups third-party and local imports. |
tests/test_tracing_live.py |
Reorders tracing dependencies. |
tests/test_tracing_decorator.py |
Organizes tracing test imports. |
tests/test_tracer_otel.py |
Separates OpenTelemetry and Azure imports. |
tests/test_testserver.py |
Organizes testserver imports. |
tests/test_streaming.py |
Reorders utility imports and removes a duplicate. |
tests/test_stream_generator.py |
Organizes standard, third-party, and SDK imports. |
tests/test_settings.py |
Removes an unused import and reorders pytest. |
tests/test_serialization.py |
Removes unused imports and organizes dependencies. |
tests/test_retry_policy.py |
Consolidates and reorders retry-test imports. |
tests/test_rest_response_backcompat.py |
Removes an unused import. |
tests/test_rest_request_backcompat.py |
Removes an unused import and reorganizes imports. |
tests/test_rest_http_response.py |
Removes an unused import and groups dependencies. |
tests/test_rest_http_request.py |
Removes unused imports and adds Pylint suppressions. |
tests/test_rest_headers.py |
Removes unused response imports. |
tests/test_requests_universal.py |
Groups standard, third-party, and SDK imports. |
tests/test_request_id_policy.py |
Reorders policy test imports. |
tests/test_polling.py |
Replaces a wildcard polling import with explicit symbols. |
tests/test_pipeline.py |
Removes unused and duplicate imports. |
tests/test_paging.py |
Moves pytest into the third-party import group. |
tests/test_messaging_cloud_event.py |
Reorders pytest and adds Pylint suppressions. |
tests/test_http_logging_policy.py |
Removes unused imports and reorganizes dependencies. |
tests/test_exceptions.py |
Reorders imports and wraps long assertions. |
tests/test_error_map.py |
Reorders local test utilities. |
tests/test_custom_hook_policy.py |
Organizes pytest and utility imports. |
tests/test_content_length_checking.py |
Removes unused pipeline and transport imports. |
tests/test_connection_string_parsing.py |
Wraps long connection-string literals. |
tests/test_basic_transport.py |
Removes unused imports and adds Pylint suppressions. |
tests/test_base_polling.py |
Promotes repeated local imports to module scope. |
tests/test_authentication.py |
Organizes standard, third-party, and local imports. |
tests/specs_sdk/modeltypes/modeltypes/models/_patch.py |
Removes an unused datetime type import. |
tests/rest_client.py |
Moves the standard-library import before SDK imports. |
tests/perf_tests/update_entity_json.py |
Wraps a long URL expression. |
tests/perf_tests/download_binary.py |
Removes an unused performance-test import. |
tests/perf_tests/_test_base.py |
Normalizes policy import syntax and wraps long text. |
tests/async_tests/test_universal_http_async.py |
Removes an unused response import and reorders dependencies. |
tests/async_tests/test_tracing_policy_async.py |
Reorders local tracing utilities. |
tests/async_tests/test_tracing_live_async.py |
Removes an unused type import and reorganizes imports. |
tests/async_tests/test_tracing_decorator_async.py |
Organizes tracing test imports. |
tests/async_tests/test_testserver_async.py |
Reorders transport imports. |
tests/async_tests/test_streaming_async.py |
Removes an unused import and organizes dependencies. |
tests/async_tests/test_stream_generator_async.py |
Reorders standard, third-party, and local imports. |
tests/async_tests/test_retry_policy_async.py |
Removes unused imports and consolidates dependencies. |
tests/async_tests/test_rest_trio_transport.py |
Reorders Trio transport test imports. |
tests/async_tests/test_rest_stream_responses_async.py |
Groups pytest separately from SDK imports. |
tests/async_tests/test_rest_response_backcompat_async.py |
Removes an unused import and reorders local dependencies. |
tests/async_tests/test_rest_http_response_async.py |
Removes an unused import and organizes utilities. |
tests/async_tests/test_rest_http_request_async.py |
Reorders standard, third-party, and SDK imports. |
tests/async_tests/test_rest_headers_async.py |
Removes unused platform and transport imports. |
tests/async_tests/test_rest_context_manager_async.py |
Removes an unused test-client import. |
tests/async_tests/test_rest_asyncio_transport.py |
Organizes asyncio transport test imports. |
tests/async_tests/test_request_trio.py |
Reorders pytest and SDK imports. |
tests/async_tests/test_request_asyncio.py |
Reorders pytest and SDK imports. |
tests/async_tests/test_polling_async.py |
Replaces a wildcard polling import with explicit symbols. |
tests/async_tests/test_pipeline_async.py |
Removes a duplicate policy import and groups dependencies. |
tests/async_tests/test_paging_async.py |
Moves pytest into the third-party import group. |
tests/async_tests/test_http_logging_policy_async.py |
Organizes logging test imports. |
tests/async_tests/test_content_length_checking_async.py |
Removes an unused pipeline import. |
tests/async_tests/test_basic_transport_async.py |
Promotes imports and adds Pylint suppressions. |
tests/async_tests/test_base_polling_async.py |
Consolidates local and Azure Core imports. |
tests/async_tests/test_authentication_async.py |
Organizes authentication test dependencies. |
samples/test_example_sync.py |
Adds sample-specific Pylint suppressions. |
samples/test_example_sansio.py |
Removes unused imports and suppresses intentional reimports. |
samples/test_example_policies.py |
Removes unused policy imports and scopes a suppression. |
samples/test_example_async.py |
Organizes imports and adds sample-specific suppressions. |
samples/example_truststore_ssl_context.py |
Suppresses intentional transport and networking imports. |
samples/example_truststore_injection.py |
Documents and suppresses intentional late SDK imports. |
samples/example_shared_transport.py |
Adds transport suppressions and wraps a long comment. |
samples/example_shared_transport_async.py |
Adds transport suppressions and wraps a long comment. |
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedTwo distinct failure groups were detected:
Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
These are largely import related errors